<!DOCTYPE html>
<html>

<head>
    <title>管理界面</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/popper.js/1.12.5/umd/popper.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/js/bootstrap.min.js"></script>
</head>

<body>

    <div class="container">
        <h2>用户反馈规则</h2>
        <table class="table table-bordered">
            <thead>
                <tr>
                    <th>问题描述</th>
                    <th>相关操作</th>
                    <th>解决方法</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {{table}}
            </tbody>
        </table>
    </div>
</body>
<script>
    function deleterule(id)
    {
        var xmlhttp = new XMLHttpRequest();
        xmlhttp.onreadystatechange = function () {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                alert(xmlhttp.responseText);
            }
        }
        var data = "type=del&id=" + id.toString();
        xmlhttp.open("POST", "/work", true);
        xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlhttp.send(data);
    }
    function rightrule(id)
    {
        var xmlhttp = new XMLHttpRequest();
        xmlhttp.onreadystatechange = function () {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                alert(xmlhttp.responseText);
            }
        }
        var data = "type=right&id=" + id.toString();
        xmlhttp.open("POST", "/work", true);
        xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlhttp.send(data);
    }
</script>
</html>